package _06_Autowired.byType;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @author HLF
 * @version V1.0
 * @package _06_Autowired
 * @date 2021/10/14 15:03
 */

@Component("mySchool")
public class School {
    @Value("北京大学")
    private String name;
    @Value("海淀区")
    private String arr;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getArr() {
        return arr;
    }

    public void setArr(String arr) {
        this.arr = arr;
    }

    @Override
    public String toString() {
        return "School{" +
                "name='" + name + '\'' +
                ", arr='" + arr + '\'' +
                '}';
    }
}
